<?php
	$conn = mysql_connect("localhost","root","root");
	if(!$conn){
		die("连接失败".mysql_errno());
	}
	mysql_query("set names utf8",$conn) or die(mysql_errno());
	mysql_select_db("emp",$conn) or die(mysql_errno());
	
	$sql = "select name from admin";
	
	$res = mysql_query($sql);
	
	while ($row= mysql_fetch_assoc($res)){
		echo "name:".$row['name'];
	}